
from tkinter import *

root= Tk()

photo = PhotoImage(file="../mm/005TgvqCgy1ftv5mj8ikyg306h06knpd.gif")

theLabel = Label(root,
    text="爱你",
    justify=LEFT,
    image=photo,
    compound=CENTER,
    font=("华康少女字体",20),
    fg="#fff")

theLabel.pack()

frame1 = Frame(root)
frame2 =Frame(root)

var  = StringVar()

var.set("Do you love me?")

tipLabel = Label(frame1,
            textvariable=var,
            justify=LEFT,
            padx=10)

tipLabel.pack(side=RIGHT)

def btn1():
    var.set("you are idiot")

# 按钮
btn1= Button(frame2,
        text="love you",
        command=btn1)


btn1.pack(padx=10,pady=10)
frame1.pack(padx=10,pady=10)
frame2.pack(padx=10,pady=10)

mainloop()